package com.ihr360.oneclick.controller;

import com.ihr360.commons.vo.ResultInfo;
import com.ihr360.oneclick.service.RowHeaderColumnService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;


/**
 * @author Eric
 * @date 2018-1-18
 */
@RestController
@RequestMapping("/template")
@Api(value = "/template", description = "系统配置信息", produces = ("application/json;charset=UTF-8"))
public class TemplateMetaController {
    @Autowired
    private RowHeaderColumnService rowHeaderColumnService;

    @GetMapping(value = "/tipTemplate")
    @ApiOperation(value = "/tip/template", httpMethod = "GET", notes = "页面说明模板数据获取",
            consumes = "application/json;charset=UTF-8", produces = "application/json;charset=UTF-8")
    public ResultInfo getTipTemplate(@RequestParam String termId) {
        String tipTemplate = rowHeaderColumnService.getTipTemplate(termId);
        return new ResultInfo.Builder<String>().success(tipTemplate);
    }
}
